home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 19 / CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso / CUCD / Programming / LEDA / man / prog / sortseq_impl.prog < prev    next >
LaTeX Document  |  1994-08-05  |  1.3 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file C++ source text default
99% file LaTeX document, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried x-fmt/111 Plain Text File default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 62 65 67 69 6e 67 72 | 6f 75 70 0a 5c 70 61 72 |\begingr|oup.\par|
|00000010| 73 6b 69 70 20 30 70 74 | 5c 62 61 73 65 6c 69 6e |skip 0pt|\baselin|
|00000020| 65 73 6b 69 70 20 30 70 | 74 0a 5c 74 74 20 7b 5c |eskip 0p|t.\tt {\|
|00000030| 74 74 5c 6f 62 65 79 73 | 70 61 63 65 73 5c 67 64 |tt\obeys|paces\gd|
|00000040| 65 66 20 7b 5c 68 73 6b | 69 70 2e 35 65 6d 7d 7d |ef {\hsk|ip.5em}}|
|00000050| 20 5c 64 65 66 5c 70 61 | 72 7b 5c 6c 65 61 76 65 | \def\pa|r{\leave|
|00000060| 76 6d 6f 64 65 5c 65 6e | 64 67 72 61 66 7d 20 5c |vmode\en|dgraf} \|
|00000070| 63 61 74 63 6f 64 65 60 | 5c 60 3d 5c 61 63 74 69 |catcode`|\`=\acti|
|00000080| 76 65 0a 5c 6f 62 65 79 | 6c 69 6e 65 73 20 5c 74 |ve.\obey|lines \t|
|00000090| 74 76 65 72 62 61 74 69 | 6d 0a 0a 74 79 70 65 64 |tverbati|m..typed|
|000000a0| 65 66 20 2e 2e 2e 20 73 | 65 71 5f 69 6d 70 6c 5f |ef ... s|eq_impl_|
|000000b0| 69 74 65 6d 3b 0a 0a 63 | 6c 61 73 73 20 73 65 71 |item;..c|lass seq|
|000000c0| 5f 69 6d 70 6c 20 20 7b | 0a 0a 20 76 69 72 74 75 |_impl {|.. virtu|
|000000d0| 61 6c 20 69 6e 74 20 20 | 63 6d 70 28 47 65 6e 50 |al int |cmp(GenP|
|000000e0| 74 72 2c 20 47 65 6e 50 | 74 72 29 20 63 6f 6e 73 |tr, GenP|tr) cons|
|000000f0| 74 20 3d 20 30 3b 0a 20 | 76 69 72 74 75 61 6c 20 |t = 0;. |virtual |
|00000100| 69 6e 74 20 20 69 6e 74 | 5f 74 79 70 65 28 29 20 |int int|_type() |
|00000110| 20 20 20 20 20 20 20 20 | 20 63 6f 6e 73 74 20 3d | | const =|
|00000120| 20 30 3b 0a 20 76 69 72 | 74 75 61 6c 20 76 6f 69 | 0;. vir|tual voi|
|00000130| 64 20 63 6c 65 61 72 5f | 6b 65 79 28 47 65 6e 50 |d clear_|key(GenP|
|00000140| 74 72 26 29 20 20 63 6f | 6e 73 74 20 3d 20 30 3b |tr&) co|nst = 0;|
|00000150| 0a 20 76 69 72 74 75 61 | 6c 20 76 6f 69 64 20 63 |. virtua|l void c|
|00000160| 6c 65 61 72 5f 69 6e 66 | 28 47 65 6e 50 74 72 26 |lear_inf|(GenPtr&|
|00000170| 29 20 20 63 6f 6e 73 74 | 20 3d 20 30 3b 0a 20 76 |) const| = 0;. v|
|00000180| 69 72 74 75 61 6c 20 76 | 6f 69 64 20 63 6f 70 79 |irtual v|oid copy|
|00000190| 5f 6b 65 79 28 47 65 6e | 50 74 72 26 29 20 20 20 |_key(Gen|Ptr&) |
|000001a0| 63 6f 6e 73 74 20 3d 20 | 30 3b 0a 20 76 69 72 74 |const = |0;. virt|
|000001b0| 75 61 6c 20 76 6f 69 64 | 20 63 6f 70 79 5f 69 6e |ual void| copy_in|
|000001c0| 66 28 47 65 6e 50 74 72 | 26 29 20 20 20 63 6f 6e |f(GenPtr|&) con|
|000001d0| 73 74 20 3d 20 30 3b 0a | 0a 70 75 62 6c 69 63 3a |st = 0;.|.public:|
|000001e0| 0a 0a 20 73 65 71 5f 69 | 6d 70 6c 28 29 3b 0a 20 |.. seq_i|mpl();. |
|000001f0| 73 65 71 5f 69 6d 70 6c | 28 63 6f 6e 73 74 20 73 |seq_impl|(const s|
|00000200| 65 71 5f 69 6d 70 6c 26 | 29 3b 0a 7e 73 65 71 5f |eq_impl&|);.~seq_|
|00000210| 69 6d 70 6c 28 29 3b 0a | 0a 20 73 65 71 5f 69 6d |impl();.|. seq_im|
|00000220| 70 6c 26 20 6f 70 65 72 | 61 74 6f 72 3d 28 63 6f |pl& oper|ator=(co|
|00000230| 6e 73 74 20 73 65 71 5f | 69 6d 70 6c 26 29 3b 0a |nst seq_|impl&);.|
|00000240| 20 73 65 71 5f 69 6d 70 | 6c 26 20 63 6f 6e 63 28 | seq_imp|l& conc(|
|00000250| 73 65 71 5f 69 6d 70 6c | 26 29 3b 0a 20 0a 20 73 |seq_impl|&);. . s|
|00000260| 65 71 5f 69 6d 70 6c 5f | 69 74 65 6d 20 69 6e 73 |eq_impl_|item ins|
|00000270| 65 72 74 28 47 65 6e 50 | 74 72 2c 47 65 6e 50 74 |ert(GenP|tr,GenPt|
|00000280| 72 29 3b 0a 20 73 65 71 | 5f 69 6d 70 6c 5f 69 74 |r);. seq|_impl_it|
|00000290| 65 6d 20 69 6e 73 65 72 | 74 5f 61 74 5f 69 74 65 |em inser|t_at_ite|
|000002a0| 6d 28 73 65 71 5f 69 6d | 70 6c 5f 69 74 65 6d 2c |m(seq_im|pl_item,|
|000002b0| 47 65 6e 50 74 72 2c 47 | 65 6e 50 74 72 29 3b 0a |GenPtr,G|enPtr);.|
|000002c0| 20 73 65 71 5f 69 6d 70 | 6c 5f 69 74 65 6d 20 6c | seq_imp|l_item l|
|000002d0| 6f 6f 6b 75 70 28 47 65 | 6e 50 74 72 29 20 20 20 |ookup(Ge|nPtr) |
|000002e0| 20 20 20 63 6f 6e 73 74 | 3b 0a 20 73 65 71 5f 69 | const|;. seq_i|
|000002f0| 6d 70 6c 5f 69 74 65 6d | 20 6c 6f 63 61 74 65 28 |mpl_item| locate(|
|00000300| 47 65 6e 50 74 72 29 20 | 20 20 20 20 20 63 6f 6e |GenPtr) | con|
|00000310| 73 74 3b 0a 20 73 65 71 | 5f 69 6d 70 6c 5f 69 74 |st;. seq|_impl_it|
|00000320| 65 6d 20 6c 6f 63 61 74 | 65 5f 70 72 65 64 28 47 |em locat|e_pred(G|
|00000330| 65 6e 50 74 72 29 20 63 | 6f 6e 73 74 3b 0a 20 73 |enPtr) c|onst;. s|
|00000340| 65 71 5f 69 6d 70 6c 5f | 69 74 65 6d 20 73 75 63 |eq_impl_|item suc|
|00000350| 63 28 73 65 71 5f 69 6d | 70 6c 5f 69 74 65 6d 29 |c(seq_im|pl_item)|
|00000360| 20 63 6f 6e 73 74 3b 0a | 20 73 65 71 5f 69 6d 70 | const;.| seq_imp|
|00000370| 6c 5f 69 74 65 6d 20 70 | 72 65 64 28 73 65 71 5f |l_item p|red(seq_|
|00000380| 69 6d 70 6c 5f 69 74 65 | 6d 29 20 63 6f 6e 73 74 |impl_ite|m) const|
|00000390| 3b 0a 20 73 65 71 5f 69 | 6d 70 6c 5f 69 74 65 6d |;. seq_i|mpl_item|
|000003a0| 20 69 74 65 6d 28 76 6f | 69 64 2a 20 70 29 20 63 | item(vo|id* p) c|
|000003b0| 6f 6e 73 74 20 7b 20 72 | 65 74 75 72 6e 20 73 65 |onst { r|eturn se|
|000003c0| 71 5f 69 6d 70 6c 5f 69 | 74 65 6d 28 70 29 3b 20 |q_impl_i|tem(p); |
|000003d0| 7d 0a 20 0a 20 47 65 6e | 50 74 72 20 6b 65 79 28 |}. . Gen|Ptr key(|
|000003e0| 73 65 71 5f 69 6d 70 6c | 5f 69 74 65 6d 29 20 63 |seq_impl|_item) c|
|000003f0| 6f 6e 73 74 3b 0a 20 47 | 65 6e 50 74 72 20 69 6e |onst;. G|enPtr in|
|00000400| 66 28 73 65 71 5f 69 6d | 70 6c 5f 69 74 65 6d 29 |f(seq_im|pl_item)|
|00000410| 20 63 6f 6e 73 74 3b 0a | 20 0a 20 76 6f 69 64 20 | const;.| . void |
|00000420| 64 65 6c 28 47 65 6e 50 | 74 72 29 3b 20 0a 20 76 |del(GenP|tr); . v|
|00000430| 6f 69 64 20 64 65 6c 5f | 69 74 65 6d 28 73 65 71 |oid del_|item(seq|
|00000440| 5f 69 6d 70 6c 5f 69 74 | 65 6d 29 3b 20 0a 20 76 |_impl_it|em); . v|
|00000450| 6f 69 64 20 63 68 61 6e | 67 65 5f 69 6e 66 28 73 |oid chan|ge_inf(s|
|00000460| 65 71 5f 69 6d 70 6c 5f | 69 74 65 6d 2c 47 65 6e |eq_impl_|item,Gen|
|00000470| 50 74 72 29 3b 0a 20 76 | 6f 69 64 20 73 70 6c 69 |Ptr);. v|oid spli|
|00000480| 74 5f 61 74 5f 69 74 65 | 6d 28 73 65 71 5f 69 6d |t_at_ite|m(seq_im|
|00000490| 70 6c 5f 69 74 65 6d 2c | 73 65 71 5f 69 6d 70 6c |pl_item,|seq_impl|
|000004a0| 26 2c 73 65 71 5f 69 6d | 70 6c 26 29 3b 0a 20 76 |&,seq_im|pl&);. v|
|000004b0| 6f 69 64 20 72 65 76 65 | 72 73 65 5f 69 74 65 6d |oid reve|rse_item|
|000004c0| 73 28 73 65 71 5f 69 6d | 70 6c 5f 69 74 65 6d 2c |s(seq_im|pl_item,|
|000004d0| 73 65 71 5f 69 6d 70 6c | 5f 69 74 65 6d 29 3b 20 |seq_impl|_item); |
|000004e0| 0a 20 76 6f 69 64 20 63 | 6c 65 61 72 28 29 3b 0a |. void c|lear();.|
|000004f0| 20 0a 20 69 6e 74 20 20 | 73 69 7a 65 28 29 20 20 | . int |size() |
|00000500| 63 6f 6e 73 74 3b 0a 7d | 3b 0a 0a 5c 65 6e 64 67 |const;.}|;..\endg|
|00000510| 72 6f 75 70 0a | |roup. | |
+--------+-------------------------+-------------------------+--------+--------+